<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<meta charset="utf-8" name="viewport" content="width=device-width">
	<script type="text/javascript" src="myhammer.js"></script>
	<!-- 功能弱性能高 -->
	<style type="text/css">
		.wrap{width: 300px;height: 300px;background: #ccc;}
	</style>
</head>
<body>
	<div class="wrap">
	</div>
	<script type="text/javascript">
		function $(...arg){
			return document.querySelectorAll(...arg);
		}
		window.onload=function(){
			let obox=$('.wrap')[0];	
			let hammer=new Myhammer(obox,{});
			hammer.on('tap',function(){
				console.log('tap')
			})
			hammer.on('press',function(){
				console.log('press')
			})
		}
	</script>
</body>
</html>